<template>
	<Layout>
		<div class="posts">
			<h1>posts</h1>
			<ul>
				<li v-for="post in $page.allPost.edges" :key="post.id">
					<g-link :to="`/post-detail/${post.node.id}`">{{
						post.node.title
					}}</g-link>
				</li>
			</ul>
		</div>
	</Layout>
</template>
<page-query>
query {
  allPost {
    edges {
      node {
        id,
        title,
        content
      }
    }
  }
}
</page-query>
<script>
export default {
	name: 'PostPage',
};
</script>
